The Unofficial Newsletter of Delphi Users March 13th, 1995 by Robert Vivrette CIS: 76416,1373 Component Design Component Design is one of the most fascinating aspects of Delphi. I hadn't even thought of developing my own custom controls in BP7, VB, or C++, yet with Delphi I have already created 4. Below is my first custom control, so please be merciful. I needed a simple currency edit field, and the MaskEdit field simply does not cut it. I feel the CurrencyEdit field is a small step forward in usability. It isn't perfect and can definitely be improved on. Essentially, the CurrencyEdit field is a modified memo field. I have put in keyboard restrictions, so the user cannot enter invalid characters. When the user leaves the field, the number is reformatted to display appropriately. You can left-, center-, or right-justify the field, and you can also specify its display format - see the FormatFloat command. Since an modifiable display format is used, it really doesnt even need to hold a currency value. It could just as easily be a percentage, or a high-precision real value with fixed digits to the right of the decimal. The field value is stored in a property called Value so you should read and write to that in your program. This field is of type Extended. If you like this control you can feel free to use it, however, if you modify it, I would like you to send me whatever you did to it. If you send me your CIS ID, I will send you copies of my custom controls that I develop in the future. Please feel free to send me anything you are working on as well. Perhaps we can spark ideas!